#ifndef TEMPLATE_SPECIAL_H_
#define TEMPLATE_SPECIAL_H_
#include<iostream>
using namespace std;
//Full Specialization

template<typename T>

void printData(const T& data){
    cout << "General template: " << data << endl;
}

template<>
// const  char* const& 指向常量指针的常引用 表示指针不可修改
// cout char* 时将会print到'\0'时中止
void printData<const char*>(const  char* const& data){
    cout << "Specialized template for const char*: \"" << data << "\"" << endl;
}


template<typename T>
class MyContainer
{
    public:
        void describe()
        {
            cout << "General template for type:" << typeid(T).name() << endl;
        }
};

template<>
class MyContainer<int>
{
    public:
        void describe()
        {
            cout << "Specialized template for int type! It's very efficient!" << endl;
        }
};




#endif